package com.wing.sell.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.sell.model.entity.CustomersInfo;
import com.wing.sell.model.request.CustomersInfoForm;
import com.wing.sell.model.response.CustomersInfoSearchVo;
import com.wing.sell.model.response.CustomersInfoVO;
import com.wing.web.excel.CustomerExcelIn;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 客户信息-Service
 *
 * @author
 */
public interface CustomersInfoService extends IService<CustomersInfo> {

    /**
     * 添加
     *
     * @param customersInfoForm
     * @return
     */
    int add(CustomersInfoForm customersInfoForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<CustomersInfoVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<CustomersInfoVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    CustomersInfoVO get4appById(Long id);

    /**
     * 查询客户线索信息
     * @param id
     * @return
     */
    List<CustomersInfoVO> leadList(Long id);

    /**
     * EXCEL模板下载
     * @param response
     * @param request
     * @param headerArr
     * @param indexArr
     * @throws IOException
     */
    void templetDown(HttpServletResponse response, HttpServletRequest request,String[] headerArr,String[] indexArr) throws IOException;

    /**
     * 导入数据
     * @param list
     * @return
     */
    JsonResult importFile(List<CustomerExcelIn> list);

    /**
     * 获取客户详情
     * @param id
     * @return
     */
    CustomersInfoSearchVo getCustomersDetail(Long id);

}
